from sqlalchemy import Table, Column, String, ForeignKey
from server.db.base import Base


# 用户-权限关联表
user_roles = Table(
    "user_role",
    Base.metadata,
    Column("user_id", String(20), ForeignKey("user.id"), primary_key=True),
    Column("role_id", String(20), ForeignKey("role.id"), primary_key=True),
)

# 权限-菜单关联表
role_menus = Table(
    "role_menu",
    Base.metadata,
    Column("role_id", String(20), ForeignKey("role.id"), primary_key=True),
    Column("menu_id", String(20), ForeignKey("menu.id"), primary_key=True),
)

